﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:typeEds="using:EString.PropertyGrid.Editors"
    xmlns:local="using:EString" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"    
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:control="using:EString.Controls" xmlns:valueConverters="using:EString.Converters"
    xmlns:PropertyGrid="using:EString.PropertyGrid" mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///Symmetry/Resources/GlobalResources.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--<valueConverters:TypeNameConverter x:Key="typeNameConverter"/>-->
	<valueConverters:FriendlyTypeNameConverter x:Key="FriendlyTypeNameConverter"/>
    <SolidColorBrush x:Key="CaretBrush" Color="#FFC2CAD0"/>
    <SolidColorBrush x:Key="ApplicationPageBackgroundBrush" ></SolidColorBrush>

    <Style x:Key="InvisiButton" TargetType="Button">
        <Setter Property="Background" Value="{StaticResource ButtonBackgroundThemeBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}"/>
        <Setter Property="Padding" Value="12,4,12,4"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="SemiBold"/>
        <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBorderThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="PointerFocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="3">
                            <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
                        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    
    
    <!--<DataTemplate x:Key="TreeNodeTemplate">
        <local:CustomControl1></local:CustomControl1>
    </DataTemplate>-->

    <Style x:Key="ButtonStyle_CtxPropGridItem" TargetType="Button">
        <Setter Property="Background" Value="#FF1F3B53"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="border">
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#00939393" Offset="0"/>
                                <GradientStop Color="#005C5C5C" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.2"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                        <DoubleAnimation Duration="0" To="0.75" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                        <ColorAnimation Duration="0" To="#DA5C5C5C" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="#FF6DBDD1" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="Background"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
                                        <ColorAnimation Duration="0" To="#FF5C5C5C" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                                        <ColorAnimation Duration="0" To="#FFBCBCBC" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="DisabledVisualElement" d:IsOptimized="True"/>
                                        <DoubleAnimation Duration="0" To="0.11" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Margin="5">
                            <Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" Background="#FF8D8D8D">
                                <Grid Background="{TemplateBinding Background}">
                                    <Border x:Name="BackgroundAnimation" Background="#FF448DCA" Opacity="0"/>
                                    <Rectangle x:Name="BackgroundGradient" Fill="#FF878787"/>
                                </Grid>
                            </Border>
                            <Rectangle x:Name="DisabledVisualElement" Fill="White" IsHitTestVisible="false" Opacity="0" StrokeThickness="0"/>
                            <Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="0.5" Opacity="0" StrokeThickness="0"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="CtxMenuPopupButton1" TargetType="Button">
        <Setter Property="Background" Value="#FF1F3B53" />
        <Setter Property="Foreground" Value="#FF000000" />
        <Setter Property="Padding" Value="3" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0" />
                    <GradientStop Color="#FF8399A9" Offset="0.375" />
                    <GradientStop Color="#FF718597" Offset="0.375" />
                    <GradientStop Color="#FF617584" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid d:DesignWidth="163" d:DesignHeight="106">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <ExponentialEase EasingMode="EaseIn" Exponent="5" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="00:00:00" Value="#FF383839" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="00:00:00" Value="#FF3F3F3F" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="mouseOverEffect" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.5">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <ExponentialEase EasingMode="EaseIn" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="toggle2" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{StaticResource BackgroundBrush}" BorderThickness="0" Width="80" Height="80" />
                        <Rectangle x:Name="mouseOverEffect" StrokeThickness="1" Fill="#FFD1D1D1" Opacity="0" Width="80" Height="80" />
                        <TextBlock VerticalAlignment="Center" Text="{TemplateBinding Content}" TextWrapping="Wrap" Foreground="#FFFCFCF0" Margin="0" HorizontalAlignment="Center" FontFamily="Century"  FontSize="12" />
                        <Canvas x:Name="toggle2" HorizontalAlignment="Right" VerticalAlignment="Top" Width="23" Opacity="0" Margin="0,20,0,0">
                            <Ellipse Fill="{StaticResource EStringOrange}" StrokeEndLineCap="Triangle" StrokeStartLineCap="Triangle" StrokeThickness="2" Height="8" Width="8" Canvas.Left="8" Canvas.Top="26" />
                        </Canvas>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>



    <!--<Style TargetType="controls:CustomControl1" >
        <Setter Property="Visibility" Value="{Binding IsVisible}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:CustomControl1">
                    <Border
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}" d:DesignWidth="256" d:DesignHeight="114">
                    	<StackPanel>
                            <StackPanel Orientation="Horizontal">
                    			<ToggleButton x:Name="PART_Expander"  Content="&gt;" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{StaticResource ToggleButtonStyle1}" BorderBrush="#FF2B2B2B" Foreground="#FF131313" Background="LightGray"/>
                    			<TextBlock x:Name="PART_Name" TextWrapping="Wrap" Text="{Binding Name}" Margin="4,0,0,0"/>
                    			<TextBlock x:Name="PART_type" TextWrapping="Wrap" Text="{Binding NodeDataType}" Margin="4,0,0,0"/>
                    		</StackPanel>
                    		<ItemsControl x:Name="PART_ic" ItemsSource="{Binding Children}"  Margin="25,0,0,0"/>
                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->

	            <Style x:Key="ToggleButtonStyle_PGExpander" TargetType="ToggleButton">
            	<Setter Property="Background" Value="{StaticResource ToggleButtonBackgroundThemeBrush}"/>
            	<Setter Property="Foreground" Value="{StaticResource ToggleButtonForegroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource ToggleButtonBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource ToggleButtonBorderThemeThickness}"/>
            	<Setter Property="Padding" Value="12,4,12,5"/>
            	<Setter Property="HorizontalAlignment" Value="Left"/>
            	<Setter Property="VerticalAlignment" Value="Center"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontWeight" Value="SemiBold"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="ToggleButton">
            				<Grid>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Normal"/>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Pressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Disabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Checked">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPointerOverBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedPressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="4" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="CheckedDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonCheckedDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter" d:IsOptimized="True"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentPresenter_Expanded" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Indeterminate"/>
            							<VisualState x:Name="IndeterminatePointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminatePressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="IndeterminateDisabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledBorderThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ToggleButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="FocusStates">
            							<VisualState x:Name="Focused">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Unfocused"/>
            							<VisualState x:Name="PointerFocused"/>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="3">
            						<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            					</Border>
            					<ContentPresenter x:Name="ContentPresenter_Expanded" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="12,4,12,5" Content="-" Opacity="0" RenderTransformOrigin="0.5,0.5">
            						<ContentPresenter.RenderTransform>
            							<CompositeTransform/>
            						</ContentPresenter.RenderTransform>
            					</ContentPresenter>
            					<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
            					<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>


    <Style TargetType="PropertyGrid:PGNodeControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="PropertyGrid:PGNodeControl">
                    
                        <!--Button x:Name="PART_BtnCtx"  Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="15" Height="15" Style="{StaticResource ButtonStyle_CtxPropGridItem}" Margin="0,5,0,0"/-->
                        <Grid Margin="0,0,20,0" >
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                            <Grid x:Name="PART_ContentHeader" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <!--<Button x:Name="PART_btnReset" Content="." Width="20" Visibility="{Binding CanReset, Converter={StaticResource MyBoolToVisibilityConverter}}"/>-->
                                <StackPanel Orientation="Horizontal">
                                    <ToggleButton x:Name="PART_Toggle" Opacity="{Binding ShowExpander}" Style="{StaticResource ToggleButtonStyle_PGExpander}">+</ToggleButton>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Text="{Binding Name}" Grid.Column="0" FontSize="13" Foreground="GhostWhite" FontFamily="Century Gothic" VerticalAlignment="Center" />
                                        <TextBlock ToolTipService.ToolTip="{Binding Self}" Text="{Binding TypeName, Converter={StaticResource FriendlyTypeNameConverter}}" 
                                           Foreground="{StaticResource CaretBrush}" VerticalAlignment="Center" Margin="17,0,0,0" FontFamily="Times New Roman" 
                                           RenderTransformOrigin="0.5,0.5" FontSize="12" TextTrimming="WordEllipsis" TextWrapping="Wrap" Grid.Column="1" />
                                        <Button Style="{StaticResource InvisiButton}" BorderThickness="0"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  x:Name="PART_BtnCtx"
                                                Grid.ColumnSpan="2" Grid.Column="0" Foreground="{x:Null}" 
                                                Background="Transparent" Margin="-7,-2,-9,-2"></Button>
                                    </Grid>
                                </StackPanel>
                            </Grid>

                            <Popup x:Name="PART_CtxPopup" IsOpen="False">
                                <Grid x:Name="PART_MainPopupGrid" Background="#B1393939" >
                                <VariableSizedWrapGrid Margin="3" Orientation="Horizontal">
                                    <Button x:Name="PART_BtnCtxNew" Content="New" Width="60" Height="60" Margin="8,9,9,9" Style="{StaticResource CtxMenuPopupButton1}" ToolTipService.ToolTip="Creates a new instance of the target type using an empty constructor if available" />
                                    <Button x:Name="PART_BtnAdd" Content="Auto" Width="60" Height="60" Margin="4,9,9,9" Style="{StaticResource CtxMenuPopupButton1}" ToolTipService.ToolTip="Sets the target content to its auto value if applicable"/>
                                    <Button x:Name="PART_BtnClear" Content="Clear" Width="60" Height="60" Margin="4,9,9,9" Style="{StaticResource CtxMenuPopupButton1}" ToolTipService.ToolTip="Sets the target value to null if applicable"/>
                                    <Button x:Name="PART_btnPin" Content="Pin Editor" Width="60" Height="60" Margin="4,9,9,9" Style="{StaticResource CtxMenuPopupButton1}" ToolTipService.ToolTip="Pins this editor for later use"/>
                                    <Button x:Name="PART_btnCustEditor" Content="Custom Editor" Width="60" Height="60" Margin="4,9,9,9" Style="{StaticResource CtxMenuPopupButton1}" ToolTipService.ToolTip="Launch the custom editor for this type"/>
                                </VariableSizedWrapGrid>
                            </Grid>
                            </Popup>

                            <ContentPresenter x:Name="PART_Content" Margin="33,0,0,0" Grid.Row="1"/>
                            <TextBlock Text="{Binding Children.Count}" Grid.Row="2"/>
                            <ItemsControl x:Name="PART_items" ItemsSource="{Binding Children}" BorderBrush="{x:Null}" BorderThickness="2" Grid.Row="3">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <PropertyGrid:PGNodeControl Margin="10"></PropertyGrid:PGNodeControl>
                                        
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                            
                        </Grid>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>





            <Style TargetType="Button">
            	<Setter Property="Background" Value="{StaticResource ButtonBackgroundThemeBrush}"/>
            	<Setter Property="Foreground" Value="{StaticResource ButtonForegroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource ButtonBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}"/>
            	<Setter Property="Padding" Value="12,4,12,4"/>
            	<Setter Property="HorizontalAlignment" Value="Left"/>
            	<Setter Property="VerticalAlignment" Value="Center"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontWeight" Value="SemiBold"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="Button">
            				<Grid>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Normal"/>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPointerOverForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Pressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Disabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="Border">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ButtonDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="FocusStates">
            							<VisualState x:Name="Focused">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Unfocused"/>
            							<VisualState x:Name="PointerFocused"/>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="Border" Background="{TemplateBinding Background}" Margin="3" BorderThickness="1" BorderBrush="#A0595959">
            						<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
            					</Border>
            					<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
            					<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>
            <Style TargetType="TextBox">
            	<Setter Property="MinWidth" Value="{StaticResource TextControlThemeMinWidth}"/>
            	<Setter Property="MinHeight" Value="{StaticResource TextControlThemeMinHeight}"/>
            	<Setter Property="Foreground" Value="{StaticResource TextBoxForegroundThemeBrush}"/>
            	<Setter Property="Background" Value="{StaticResource TextBoxBackgroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource TextControlBorderThemeThickness}"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
            	<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
            	<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
            	<Setter Property="Padding" Value="{StaticResource TextControlThemePadding}"/>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="TextBox">
            				<Grid>
            					<Grid.Resources>
            						<Style x:Name="DeleteButtonStyle" TargetType="Button">
            							<Setter Property="Template">
            								<Setter.Value>
            									<ControlTemplate TargetType="Button">
            										<Grid>
            											<VisualStateManager.VisualStateGroups>
            												<VisualStateGroup x:Name="CommonStates">
            													<VisualState x:Name="Normal"/>
            													<VisualState x:Name="PointerOver">
            														<Storyboard>
            															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
            																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBackgroundThemeBrush}"/>
            															</ObjectAnimationUsingKeyFrames>
            															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
            																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPointerOverBorderThemeBrush}"/>
            															</ObjectAnimationUsingKeyFrames>
            														</Storyboard>
            													</VisualState>
            													<VisualState x:Name="Pressed">
            														<Storyboard>
            															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BackgroundElement">
            																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBackgroundThemeBrush}"/>
            															</ObjectAnimationUsingKeyFrames>
            															<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
            																<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource TextBoxButtonPressedBorderThemeBrush}"/>
            															</ObjectAnimationUsingKeyFrames>
            														</Storyboard>
            													</VisualState>
            													<VisualState x:Name="Disabled">
            														<Storyboard>
            															<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
            															<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
            														</Storyboard>
            													</VisualState>
            												</VisualStateGroup>
            												<VisualStateGroup x:Name="FocusStates"/>
            											</VisualStateManager.VisualStateGroups>
            											<Border x:Name="BorderElement" BorderBrush="{StaticResource TextBoxButtonBorderThemeBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            											<Border x:Name="BackgroundElement" Background="{StaticResource TextBoxButtonBackgroundThemeBrush}" Margin="{TemplateBinding BorderThickness}">
            												<TextBlock x:Name="GlyphElement" Foreground="{StaticResource ControlBackgroundBrush}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="&#xE0A4;" VerticalAlignment="Center"/>
            											</Border>
            										</Grid>
            									</ControlTemplate>
            								</Setter.Value>
            							</Setter>
            						</Style>
            					</Grid.Resources>
            					<Grid.ColumnDefinitions>
            						<ColumnDefinition Width="*"/>
            						<ColumnDefinition Width="Auto"/>
            					</Grid.ColumnDefinitions>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Disabled"/>
            							<VisualState x:Name="Normal">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="{StaticResource TextControlBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
            									<DoubleAnimation Duration="0" To="{StaticResource TextControlBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBackgroundThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundElement"/>
            									<DoubleAnimation Duration="0" To="{StaticResource TextControlPointerOverBorderThemeOpacity}" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BorderElement"/>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush)" Storyboard.TargetName="BackgroundElement">
            										<DiscreteObjectKeyFrame KeyTime="0">
            											<DiscreteObjectKeyFrame.Value>
            												<SolidColorBrush Color="Black"/>
            											</DiscreteObjectKeyFrame.Value>
            										</DiscreteObjectKeyFrame>
            									</ObjectAnimationUsingKeyFrames>
            									<ColorAnimation Duration="0" To="#FF2C2C2C" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="BackgroundElement" d:IsOptimized="True"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Focused"/>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="ButtonStates">
            							<VisualState x:Name="ButtonVisible">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeleteButton">
            										<DiscreteObjectKeyFrame KeyTime="0">
            											<DiscreteObjectKeyFrame.Value>
            												<Visibility>Visible</Visibility>
            											</DiscreteObjectKeyFrame.Value>
            										</DiscreteObjectKeyFrame>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="ButtonCollapsed"/>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="BackgroundElement" Grid.ColumnSpan="2" Margin="{TemplateBinding BorderThickness}" Background="#FF3E3E3E"/>
            					<Border x:Name="BorderElement" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2"/>
            					<ScrollViewer x:Name="ContentElement" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" Margin="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled" Foreground="{StaticResource TextBrush}"/>
            					<Button x:Name="DeleteButton" BorderThickness="{TemplateBinding BorderThickness}" Grid.Column="1" FontSize="{TemplateBinding FontSize}" IsTabStop="False" Style="{StaticResource DeleteButtonStyle}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>


            <Style TargetType="ComboBox">
            	<Setter Property="Padding" Value="8,0"/>
            	<Setter Property="Foreground" Value="{StaticResource ComboBoxForegroundThemeBrush}"/>
            	<Setter Property="Background" Value="{StaticResource ComboBoxBackgroundThemeBrush}"/>
            	<Setter Property="BorderBrush" Value="{StaticResource ComboBoxBorderThemeBrush}"/>
            	<Setter Property="BorderThickness" Value="{StaticResource ComboBoxBorderThemeThickness}"/>
            	<Setter Property="TabNavigation" Value="Once"/>
            	<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
            	<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
            	<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
            	<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto"/>
            	<Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True"/>
            	<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
            	<Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True"/>
            	<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
            	<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
            	<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
            	<Setter Property="ItemsPanel">
            		<Setter.Value>
            			<ItemsPanelTemplate>
            				<CarouselPanel/>
            			</ItemsPanelTemplate>
            		</Setter.Value>
            	</Setter>
            	<Setter Property="Template">
            		<Setter.Value>
            			<ControlTemplate TargetType="ComboBox">
            				<Grid>
            					<Grid.ColumnDefinitions>
            						<ColumnDefinition Width="*"/>
            						<ColumnDefinition Width="32"/>
            					</Grid.ColumnDefinitions>
            					<VisualStateManager.VisualStateGroups>
            						<VisualStateGroup x:Name="CommonStates">
            							<VisualState x:Name="Normal"/>
            							<VisualState x:Name="PointerOver">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="Highlight">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxSelectedPointerOverBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="Background">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ApplicationPageBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground)" Storyboard.TargetName="DropDownGlyph">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ControlForegroundBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Pressed">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PressedBackground"/>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DropDownGlyph">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxArrowPressedForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill)" Storyboard.TargetName="PressedBackground">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackgroundBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Disabled">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DropDownGlyph">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxArrowDisabledForegroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="FocusStates">
            							<VisualState x:Name="Focused">
            								<Storyboard>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HighlightBackground"/>
            									<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Highlight"/>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.Background)" Storyboard.TargetName="HighlightBackground">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemBackgroundThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="FocusedPressed">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="Highlight">
            										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxPressedHighlightThemeBrush}"/>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Unfocused"/>
            							<VisualState x:Name="PointerFocused"/>
            							<VisualState x:Name="FocusedDropDown">
            								<Storyboard>
            									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="PopupBorder">
            										<DiscreteObjectKeyFrame KeyTime="0">
            											<DiscreteObjectKeyFrame.Value>
            												<Visibility>Visible</Visibility>
            											</DiscreteObjectKeyFrame.Value>
            										</DiscreteObjectKeyFrame>
            									</ObjectAnimationUsingKeyFrames>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            						<VisualStateGroup x:Name="DropDownStates">
            							<VisualState x:Name="Opened">
            								<Storyboard>
            									<SplitOpenThemeAnimation ContentTranslationOffset="0" ContentTargetName="ScrollViewer" ClosedLength="{Binding TemplateSettings.DropDownClosedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" OffsetFromCenter="{Binding TemplateSettings.DropDownOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" OpenedTargetName="PopupBorder" OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
            								</Storyboard>
            							</VisualState>
            							<VisualState x:Name="Closed">
            								<Storyboard>
            									<SplitCloseThemeAnimation ContentTranslationOffset="40" ContentTranslationDirection="{Binding TemplateSettings.SelectedItemDirection, RelativeSource={RelativeSource Mode=TemplatedParent}}" ContentTargetName="ScrollViewer" ClosedLength="{Binding TemplateSettings.DropDownClosedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" OffsetFromCenter="{Binding TemplateSettings.DropDownOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" OpenedTargetName="PopupBorder" OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
            								</Storyboard>
            							</VisualState>
            						</VisualStateGroup>
            					</VisualStateManager.VisualStateGroups>
            					<Border x:Name="Background" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" Background="Transparent"/>
            					<Rectangle x:Name="PressedBackground" Fill="{StaticResource ComboBoxPressedHighlightThemeBrush}" Margin="{TemplateBinding BorderThickness}" Opacity="0"/>
            					<Border x:Name="HighlightBackground" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource ComboBoxFocusedBackgroundThemeBrush}" Grid.ColumnSpan="2" Opacity="0"/>
            					<Rectangle x:Name="Highlight" Fill="{StaticResource ComboBoxSelectedBackgroundThemeBrush}" Margin="{TemplateBinding BorderThickness}" Opacity="0"/>
            					<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{StaticResource ButtonForegroundThemeBrush}"/>
            					<TextBlock x:Name="DropDownGlyph" Grid.Column="1" Foreground="{StaticResource ComboBoxArrowForegroundThemeBrush}" FontWeight="Bold" FontSize="{StaticResource ComboBoxArrowThemeFontSize}" FontFamily="{StaticResource SymbolThemeFontFamily}" HorizontalAlignment="Right" IsHitTestVisible="False" Margin="0,0,6,4" Text="&#xE011;" VerticalAlignment="Center"/>
            					<Popup x:Name="Popup">
            						<Border x:Name="PopupBorder" BorderBrush="{StaticResource ComboBoxPopupBorderThemeBrush}" BorderThickness="{StaticResource ComboBoxPopupBorderThemeThickness}" Background="{StaticResource ComboBoxPopupBackgroundThemeBrush}" HorizontalAlignment="Stretch">
            							<ScrollViewer x:Name="ScrollViewer" BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" Foreground="{StaticResource ComboBoxPopupForegroundThemeBrush}" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" VerticalSnapPointsType="OptionalSingle" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" VerticalSnapPointsAlignment="Near" ZoomMode="Disabled">
            								<ItemsPresenter/>
            							</ScrollViewer>
            						</Border>
            					</Popup>
            				</Grid>
            			</ControlTemplate>
            		</Setter.Value>
            	</Setter>
            </Style>


		<Style TargetType="CheckBox">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="{StaticResource CheckBoxContentForegroundThemeBrush}"/>
			<Setter Property="Padding" Value="2,3,0,0"/>
			<Setter Property="HorizontalAlignment" Value="Stretch"/>
			<Setter Property="VerticalAlignment" Value="Center"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="VerticalContentAlignment" Value="Top"/>
			<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
			<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="CheckBox">
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="PointerOver">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxPointerOverForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IndeterminateGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxPointerOverForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxPressedForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IndeterminateGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxPressedForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="CheckGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxDisabledForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IndeterminateGlyph">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxDisabledForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource CheckBoxContentDisabledForegroundThemeBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="CheckStates">
									<VisualState x:Name="Checked">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="CheckGlyph"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unchecked"/>
									<VisualState x:Name="Indeterminate">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="IndeterminateGlyph"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="PointerFocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="27"/>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>
								<Grid VerticalAlignment="Top">
									<Rectangle x:Name="NormalRectangle" Fill="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}" Height="21" UseLayoutRounding="False" Width="21" Stroke="{StaticResource ApplicationForegroundThemeBrush}"/>
									<Path x:Name="CheckGlyph" Data="F1 M 0,58 L 2,56 L 6,60 L 13,51 L 15,53 L 6,64 z" Fill="{StaticResource AppBarItemForegroundThemeBrush}" FlowDirection="LeftToRight" Height="14" Opacity="0" Stretch="Fill" Width="16"/>
									<Rectangle x:Name="IndeterminateGlyph" Fill="{StaticResource AppBarItemForegroundThemeBrush}" Height="9" Opacity="0" UseLayoutRounding="False" Width="9"/>
									<Rectangle x:Name="FocusVisualWhite" Height="27" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1" Width="27"/>
									<Rectangle x:Name="FocusVisualBlack" Height="27" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1" Width="27"/>
								</Grid>
								<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>


</ResourceDictionary>

